<template>
  <div>
    <TabControl
    :list="list"
    @itemClick="itemClick"
    ></TabControl>

    <h2>{{conTent[currentindex]}}</h2>
  </div>
  
</template>

<script>
  import TabControl from './TabControl.vue'
  export default {
    name: 'App',
    data() {
      return {
        list: ["衣服", "裤子", "鞋子"],
        conTent: ["衣服页面", "裤子页面", "鞋子页面"],
        currentindex:0
      }
    },
    components: {
      TabControl
    },
    methods: {
      itemClick(index) {
        this.currentindex = index;
      }  
    },
  }
</script>

<style>

</style>
